{extend name="index/index"/}

{block name="mycss"}
	{css href="/static/index/css/index.css" }
	{css href="/static/index/css/search.css" }
{/block}

{block name="main"}
	<div class="main">
		<div class="leftSide">
			<div class="search-tool">
				<a href="javascript:;" class="tool-item tool-checked">相关 <span class="icon"></span></a>
				<a href="javascript:;" class="tool-item">销量 <span class="icon"></span></a>
				<a href="javascript:;" class="tool-item">评分 <span class="icon"></span></a>
				<a href="javascript:;" class="tool-item">价格 <span class="icon"></span></a> 
				<a href="javascript:;" class="tool-item">出版时间 <span class="icon"></span></a>
				<div class="tool-last">
					<a href="javascript:;" class="tool-long">仅电子书<span class="my-checkbox my-checked icon"></span></a>
				</div>
			</div>
			{if (!empty($res))}
			<div class="main-bd">
				<div class="search-tips">为您找到相关的电子书23本</div>
				<div class="search-list">
					{volist name="res" id="v"}
					<div class="search-item">
						<a href="{:url('index/Details/read',['id'=>$v.id])}">
							<img src="{$v.face}" class="item-img">
						    <span class="item-tit">{$v.name}</span>
						</a>
						<span class="item-author"><label class="mgr8">作者</label>{$v.author}</span>
						<span class="item-info"><label class="mgr8">介绍</label>{$v.tag}</span>
						<div class="ebook-item">
							<span class="item-price">￥{$v.price}</span>
							<div class="readBox">
								<a href="{:url('index/Details/readbook',['id'=>$v.id])}" class="readBtn Btn-color Btn-sm">免费试读</a>
							</div>
						</div>
					</div>
					{/volist}
				</div>
			</div>
			{else /}
			<div class="main-bd">
				<div class="search-list">
					<div class="inner-content">
						<span class="img left-img"></span>
						<div class="tit-info">
							<p class="word">《{$search}》</p>
							<span class="tip">此书正在建设中呢>_<......</span>
							<span class="img right-img"></span>
						</div>
					</div>
				</div>
			</div>
			{/if}


			<div class="main-ft">
				<p class="othBuy-tit">{$res== null? '热门推荐' : '搜索“'.$search.'”的人还购买了'}</p>
				<div class="othBuy-books">
					{volist name="other" id="v"}
					<div class="othBuy-ebook othBuy-item">
						<a href="{:url('index/Details/readbook',['id'=>$v.id])}"><img class="othBuy-img" src="{$v.face}">
							<span class="othBuy-name">{$v.name}</span>
						</a>
						<span class="othBuy-price">￥{$v.price}</span>
					</div>
					{/volist}
				</div>
			</div>

		</div>


		<div class="rightSide">
			<div class="recom-books-warp">
			{if !empty($res)}
				<div class="tip-text">精彩图书推荐</div>
				<div class="recom-books-list">
					{volist name="recom" id="v"}
					<div class="recom-book-item">
						<a href="{:url('index/Details/readbook',['id'=>$v.id])}">
							<div class="shadow"></div>
							<img class="recom-item-img" src="{$v.face}">
							<span class="recom-item-name">{$v.name}</span>
						</a>
						<span class="recom-item-author">{$v.author}</span>
						<span class="recom-item-price">￥{$v.price}</span>
					</div>
					{/volist}
				</div>
			{/if}
			</div>
			<div class="ad-img-warp">
				<img class="ad-img" src="/static/index/images/ad0.jpg">
				<img class="ad-img" src="/static/index/images/ad1.jpg">
				<img class="ad-img" src="/static/index/images/ad2.jpg">
			</div>
		</div>

		<div style="clear:both"></div>
	</div>
	<div style="clear:both;border-top: 1px solid #e9eae9;"></div>
{/block}